<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作业10</title>
</head>
<body>
<script>
    // 统计 [1-100] 之间有多少个质数
    var count = 0;
    for (let n = 2; n < 101; n++) {
        var flag = true;
        for (let i = 2; i < n; i++) {
            if (n % i == 0) {
                flag = false;
                break;
            }
        }
        if (flag) {
            count++;
        }
    }
    console.log("count="+count);
</script>
</body>
</html>